Refactor 1 🥔 2 🥔 ➰y kind of code#21
Conversation
Adds some more Array flavour to the Rust flavoured Python. Scalars 1 and 2 have no Direction, Vectors do. Kept the Direction Enum, but Vector inherits from tuple, because Python Enums are weird. Members of Enums that inherit from object don't get the wrapped dunder methods like the int, str and apparently tuple, do: e.g. we'd have to write `Direction.ACROSS.value` everywhere.
|
PS An Nvidia employee should know that any game gets better by adding a ray trace or two. 😉 |
|
I will review on Friday probably! Thanks, it looks good from quick glance : ) |
|
Haha. It was mostly written as a joke... to give some amusement back. I've listened through all the ADSP backlog and am now listening through The Array Cast. And Joel Kaplan is even more of a New Yorka' than Bryce. What a great episode. Made me listen on 1x speed, just to savour it. Did you hear Casey Muratori on Software Unscripted? I think he'd be a great guest for ADSP too. His views on "clean code" will contrast very nicely with our soft spot for elegant ML-like/Iversonian expressions. It happened to coincide with me listening to an Array Cast episode about performance. |
I did listen to it. It was a great episode. Love how animated he got about how terrible CSS is lol |
|
Joel Kaplan got implicitly mentioned last week, as "a former guest" that would call this 1 🥔 2 🥔 . I've never written a glyph of APL, but I love the Array Cast. Closest I got, was see the pandas jupyter notebook I used to process my running data speed up multiple orders in wall clock time, when I stopped looping and started expressing. |
Adds some more Array flavour to the Rust flavoured Python. Scalars 1 and 2 have no Direction, Vectors do.
Kept the Direction Enum, but Vector inherits from tuple, because Python Enums are weird. Members of Enums that inherit from object don't get the wrapped dunder methods like the int, str and apparently tuple, do: e.g. we'd have to write
Direction.ACROSS.valueeverywhere.